
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Spinning.Spinning.Unitity;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Devices.Sensors;
using Spinning.Spinning.Scenes.Basic;

namespace Spinning.Spinning.Entity
{
    public abstract class BaseScene : Scene
    {
        
        public TouchManager TouchManager { get; protected set; }
        public Camera Camera { get; protected set; }

        public BaseScene()
            : base()
        {
            Size = new Vector2(1);
            TouchManager = new TouchManager(this);
            UpdateHandlers.Add(TouchManager);
          //  UpdateHandlerListener += TouchManager.OnUpdate;
            Camera = new Camera();
        }

        protected override void UpdateProjection(GameTime gameTime)
        {
            Matrix m = Camera.Projection;//screen
            if (Parent != null)
            {
                m = Parent.GetProjectionMatrix();
            }
            Projection = m;
        }

        public abstract BaseScene Clone();
    }
}
